export const printRegion = (region) => {
    const area = document.querySelector(region)
    //打开一个新窗口newWindow
    const newWindow = window.open("打印窗口", "_blank");
    //要打印的div的内容
    const docStr = area.innerHTML;
    //打印内容写入newWindow文档
    newWindow.document.write(docStr);
    //关闭文档
    newWindow.document.close();
    //调用打印机
    newWindow.print();
    //关闭newWindow页面
    newWindow.close();
}